from django.urls import re_path
from rest_framework.routers import DefaultRouter

from apps.myapp.views import StockModelViewSet, StockModelInstViewSet

router = DefaultRouter()
router.register(r'stockmodel', StockModelViewSet)
router.register(r'stockmodelinst', StockModelInstViewSet)
urlpatterns = [
    re_path('stockmodel/list/', StockModelViewSet.as_view({'get': 'get_model_name'})),
]
urlpatterns += router.urls
